package com.hc.service;

import com.hc.common.bean.PageBean;
import com.hc.domain.Author;
import com.hc.domain.User;
import com.hc.query.AuthorVO;
import com.hc.query.UserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: hecai
 * @date: 2021/11/10 14:09
 * @description: 
 */
public interface AuthorService{


    int deleteByPrimaryKey(Long id);

    int insert(Author record);

    int insertSelective(Author record);

    /**
     * @param pageNum 当前页
     * @param pageSize 每页的数据量
     * @param authorVO 查找
     * @return
     */
    PageBean<Author> selectPageByCondition(Integer pageNum, Integer pageSize, AuthorVO authorVO);

    Author selectByPrimaryKey(Long id);
    String selectNameByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Author record);

    int updateByPrimaryKey(Author record);
    Author selectByName(String name);

    List<Long> selectAuthorIdsByName(@Param("names") String[] names);
    /**
     * 根据用户id启用作者
     * @param id
     * @return
     */
    int avctiveByPrimaryKey(Long id);
    /**
     * 根据用户id禁用作者
     * @param id
     * @return
     */
    int disabledByPrimaryKey(Long id);
}
